 
<load href="./Public/Js/jgsat.js"/>
<style>
	#cart_box{overflow:hidden;margin-top:15px;}
	#buy_ico {float:left;width:90px;height:95px;margin:5px 35px;_margin:5px 25px;background:url(cart.jpg) no-repeat;}
	#buy_tab {float:left;margin-top:40px;background:url(buy_tabs.gif) no-repeat;width:385px;height:35px;line-height:35px;}
	#buy_tab ul {margin:0;padding:0;width:385px;height:35px;line-height:35px;background:url(buy_on.gif) no-repeat -20px 0;}
	#buy_tab ul.buy_1 {background:url(buy_on.gif) no-repeat 106px 0;}
	#buy_tab ul.buy_2 {background:url(buy_on.gif) no-repeat 231px 0;}
	#buy_tab ul li {float:left;width:105px;margin:0;text-align:center;padding-right:20px;}
	#buy_tab ul li.one {width:105px;}
	.order_table{ width:100%;  margin:0 auto; overflow:hidden;}
	.order_table table{ width:100%; margin:20px auto;border:1px solid #eee;}
	.order_table table th { border-bottom:2px #E2E9EA solid;background:#EEF3F7;color:#333;height:35px;}
	.order_table table td { border-bottom:1px #eee solid; border-left:1px #eee solid;}
	.order_table table td .num {text-align:center;}
	#prototal{ float:right; margin:25px 15px 10px 0; display:inline;line-height:40px;}
	#prototal span{ float:left;line-height:40px;}
	#prototal span#totalnum {color:#FF3300;}
	#prototal span#totalprice {color:#FF3300;font-size:18px;font-weight:bold;}
	#buy_button{float:right; height:35px; margin:20px 25px 0px 0;_margin:20px 15px 0 0; display:inline;}
	#buy_button img{ border:none;margin-left:60px;}
	.img_but { border:none;margin-left:60px;}
	.order_userinfo {margin:0 15px;}
	.order_userinfo h2 {background: #9FD2FF;height:35px;line-height:35px;border:none;}
	.order_userinfo ul {padding:5px;}
	.order_userinfo ul li {line-height:28px;clear:both;}
	.order_userinfo ul li input {line-height:18px;height:18px;padding:2px 3px;width:190px;}
	.order_userinfo ul li span {float:left;width:80px;}
	.order_ok_message {color:both;padding:20px;text-align:center;font-size:14px;color:#FB0000;line-height:26px;}
</style>

		<div class="order_table">

			<input type="hidden" name="id" id="orderid" value="{$order['id']}" />
			<br>
			<span style="float:left;padding:5px;color:#FB0000;line-height:22px;">{:L(ORDER_SN)}:{$order['sn']}</span>
			<span style="float:right;padding:5px;line-height:22px;">{:L('ORDER_ADD_TIME')}:{$order['add_time']|toDate=###,'Y-m-d H:i:s'}</span>
				<table cellpadding=0 cellspacing=0 class="table_form" width="100%">
					  <tr>
						<th colspan="4"> <span  style="float:left;">
						<input type="button" value="{:L(DO_BUT_TEXT_0)}" {if $order['status']!=0} disabled {/if} onclick="order_status('status',1,'{:L(order_status_1)}');"> &nbsp;
						<input type="button" value="{:L(DO_BUT_TEXT_1)}" {if $order['status']==3 || $order['pay_status']>=2} disabled {/if} onclick="order_status('pay_status',2,'{:L(pay_status_2)}');"> &nbsp;
						<input type="button" value="{:L(DO_BUT_TEXT_2)}" {if $order['pay_status']>3 || $order['status']==3 || $order['shipping_status']!=0} disabled {/if} onclick="order_status('shipping_status',1,'{:L(shipping_status_1)}');"> &nbsp;
						<input type="button" value="{:L(DO_BUT_TEXT_3)}" {if $order['pay_status']>3 ||  $order['status']==3 || $order['status']==2} disabled {/if} onclick="order_status('status',2,'{:L(order_status_2)}');"> &nbsp;
						<input type="button" value="{:L(DO_BUT_TEXT_4)}" {if  $order['pay_status']!=3} disabled {/if} onclick="order_status('pay_status',4,'{:L(pay_status_4)}');"> &nbsp;
						<input type="button" value="{:L(DO_BUT_TEXT_5)}" {if $order['pay_status']!=3} disabled {/if} onclick="order_status('status',4,'{:L(order_status_4)}');"> &nbsp;
						<input type="button" value="{:L(DO_BUT_TEXT_6)}" {if $order['status']>=2 || $order['pay_status']!=0 ||  $order['shipping_status']!=0 } disabled {/if}onclick="order_status('status',3,'{:L(order_status_3)}');"> &nbsp;

						<input type="button" value="{:L(DO_BUT_TEXT_7)}" {if $order['status']>=2 ||  $order['shipping_status']!=0 } disabled {/if}onclick="order_status('status',5,'{:L(order_status_5)}');"> &nbsp;
						</span>
						{:L(order_status)}：{:L("order_status_".$order['status'])} | {:L("pay_status_".$order['pay_status'])} | {:L("shipping_status_".$order['shipping_status'])}
						</th>
					  </tr>

 		 
					<tr>
						<td width="120">{:L('Order_payment_type')}</td>
						<td>{if $order[pay_name]}{$order.pay_name} &nbsp;<input type="button" class="button" value="{:L(edit)}" onclick="openwin('address','{:U($module_name."/edit?do=payment&id=".$order[id]."&isajax=1")}',title,600,350);">{else}N/A{/if}</td>
						<td  width="120">{:L('ORDER_pay_time')}：</td>
						<td  width="220">{if $order['pay_time']}{$order['pay_time']|toDate=###,'Y-m-d H:i:s'}{else}N/A{/if}</td>
					</tr> 
	 
					<tr>
						<td>{:L('Order_shipping_info')}：</td>
						<td>{if $order[shipping_name]}{$order.shipping_name} &nbsp;<input type="button" class="button" value="{:L(edit)}" onclick="openwin('address','{:U($module_name."/edit?do=shipping&id=".$order[id]."&isajax=1")}',title,600,350);">{else}N/A{/if}</td>
						<td>{:L('ORDER_shipping_time')}：</td>
						<td>{if $order['shipping_time']}{$order['shipping_time']|toDate=###,'Y-m-d H:i:s'}{else}N/A{/if}</td>
					</tr>
 
					<tr>
						<td>{:L('Order_shipping_sn')}：</td>
						<td>{if $order['shipping_sn']}{$order['shipping_sn']} &nbsp; <a href="javascript:void(0);" onclick="openwin('address','{:U($module_name."/edit?do=shipping_show&id=".$order[id]."&isajax=1")}',title,600,350);">{:L(ORDER_SHIPPING_SHOW)}</a>{else}
						N/A <input type="button" class="button" value="{:L(edit)}" onclick="openwin('address','{:U($module_name."/edit?do=shipping_sn&id=".$order[id]."&isajax=1")}',title,600,350);">{/if} </td>
						<td>{:L('ORDER_accept_time')}</td>
						<td>{if $order['accept_time']}{$order['accept_time']|toDate=###,'Y-m-d H:i:s'}{else}N/A{/if}</td>
					</tr>
		 

				</table>
				
{if $order['ordertype']==1}
				<table cellpadding=0 cellspacing=0 class="table_form" width="100%"> 
                    <tr>
						<th colspan="4" ><span style="float:left;font-weight:bold;">{:L('Order_address_info')} <input type="button" class="button" value="{:L(edit)}" onclick="openwin('address','{:U($module_name."/edit?do=address&id=".$order[id]."&isajax=1")}',title,600,350);"></span></th>
					<tr>
 		
					<tr>
						<td width="120">{:L('address')}</td>
						<td>{$Area[$order[province]]}  - {$Area[$order[city]]}   -  {$Area[$order[area]]} &nbsp;{$order.address}</td>
						<td  width="120">{:L('realname')}</td>
						<td width="220"> {$order.consignee}&nbsp;</td>
					</tr>		

					<tr>
						<td>{:L('telephone')}</td>
						<td>{$order.tel}&nbsp;</td>			
						<td>{:L('zipcode')}</td>
						<td>{$order.zipcode}&nbsp;</td>
					</tr> 
	 
					<tr>
						<td>{:L('mobile')}</td>
						<td>{$order.mobile}&nbsp;</td>
						<td>{:L('email')}</td>
						<td>{$order.email}&nbsp;</td>
					</tr>
				</table>
{/if}
				
				<div class="c"></div>

						
                        <table width="100%" border="0" cellspacing="0" class="table_form" cellpadding="0" align="center">

						
						 <tr align="center">
							<th colspan="6"><span style="float:left;font-weight:bold;">{:L('Order_product_info')} <input type="button" class="button" value="{:L(edit)}" onclick="openwin('address','{:U($module_name."/edit?do=data&id=".$order[id]."&isajax=1")}',title,600,350);"></span></th>

                          </tr>

				 
					 
                          <tr align="center" style="background:#F8F8F8;" >
							<td width="15%">{:L('Order_product_thumb')}</td>
                            <td width="35%">{:L('Order_product_name')}</td>
                            <td width="10%">产品类型</td>
                            <td width="10%">{:L('Order_product_price')}</td>
                            <td width="12%">{:L('Order_product_number')}</td>
                            <td>{:L('manage')}</td>
                          </tr>
						  
							  <tr align="center">
								<td height="70" style="border-left:none;"><img src="{$order['product_thumb']|thumb}" width="60" height="60"/></td>
								<td>{$order['product_name']}<br />{$order['jgprosta']}</td>
                                <td>{if $order['ordertype']==2}购物体验劵<br />{$order[djqcode]}{else}实物邮递{/if}</td>
								<td>{if $order['ordertype']==2}{$order['djqprice']}{else}{$order['price']}{/if}</td>
								<td>{$order['number']}</td>
								<td> <a href="{$order['product_url']}" target="_blank">{:L('Order_view_product')}</a></td>
							 </tr>
                             
							 <tr align="center">
								<td colspan="5" align="right">{:L('Order_product_count')}：</td>
								<td><b style="color:#FB0000;font-size:14px;">{$order['amount']|number_format=###,2}元</b></td>
							 </tr>
						 </if>
						</table>
                   
                
					<div class="c"></div>

					<table cellpadding=0 cellspacing=0 class="table_form" width="100%"> 
						<tr>
							<th ><span style="float:left;font-weight:bold;">{:L('Order_payment_info')} <input type="button" class="button" value="{:L(edit)}" onclick="openwin('address','{:U($module_name."/edit?do=money&id=".$order[id]."&isajax=1")}',title,600,350);"></span></th>
						<tr>
			
						<tr>
							<td  align="right">{:L('Order_product_amount')}：￥{$order[amount]|number_format=###,2}&nbsp;&nbsp;&nbsp;&nbsp;<br>
        {if $order[shipprice]>0 && $order['ordertype']==1}+ 邮费：￥{$order[shipprice]|number_format=###,2}&nbsp;&nbsp;&nbsp;&nbsp;<br>{/if}
        {if $order[gift]>0}- 积分抵现：￥{$order[giftprice]|number_format=###,2}&nbsp;&nbsp;&nbsp;&nbsp;<br>{/if}
		{if $order[discount]!=0}- {:L('Order_discount')}：￥{$order[discount]|number_format=###,2}&nbsp;&nbsp;&nbsp;&nbsp;{/if}
										</td>
						 
						</tr>
						<tr>
							<td  align="right"><p style="font-size:16px;padding:10px 0;">
										<strong >{:L('Order_amount')}：</strong><b style="font-size:16px;">￥{$order[order_amount]|number_format=###,2}</b>&nbsp;&nbsp;&nbsp;&nbsp;<br></td>
						 
						</tr> 
					</table>

				<div class="c"></div>
				 </div>

 

			
				 
				  </form>
			 
			</div>
		<br>
</div>

<script>
function order_status(type,value ,msg){

	var  datas={'type':type,'value':value,'dosubmit':'1'};
	art.dialog({
		title: '{:L(Warning)}',
		content: '{:L(ORDER_EDIT_STATUS)}(<font color="red">'+msg+'</font>)?',
		ok: function () {
			$.ajax({
				type:"POST",
				url: ROOT+"/index.php?g=Admin&m=Order&a=edit&do=status&id={$order.id}",
				data:  datas,
				timeout:"4000",
				dataType:"JSON",
				success: function(data){ 
					art.dialog({ lock:true,icon: 'ok',time:'2',content: data.msg});
					 setTimeout(function(){	window.location.href = '{:U("Order/show?id=".$order[id])}';},2000);
					
				},
				error:function(){
					art.dialog({ lock:true,icon: 'error',time:'2',content: 'Link error!'});
					return false;
				}
			});
			
		},
		cancel: true

	});
      

}



</script>
 <!--JGsat企业建站系统 www.jgsat.com-->                                                                                                                                                                                                                                                                                                                                                                                                                                                